﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        /// <summary>
        /// 计算 1，1，2，3，5，8，13，21，34。。。。。。第30个数 用递归算法实现。
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
           new Program(). test(4);

            string strTmp = "abcdefg某某某";
            Console.WriteLine(Encoding.Default.GetBytes("某"));
            Console.WriteLine(Encoding.Default.GetBytes(strTmp) );

          var s=  Encoding.Default.GetString(Encoding.Default.GetBytes("某"));
            

            int i = System.Text.Encoding.Default.GetBytes(strTmp).Length;

            int j = strTmp.Length;
            Console.WriteLine(i);
            Console.WriteLine(j);

            Console.WriteLine(GetResult(5));
            Console.ReadKey();
        }

         void test(object i)

        {

            lock (this)

            {
                int ii = Convert.ToInt32(i);
                if (ii > 10)

                {

                    ii--;

                    test(ii);

                }

            }

        }

        static int GetResult( int index)
        {
            int first = 1;
            int second = 1;
            if (index < 3)
            {
                return 1;
            }

            return GetResult(index - 1) + GetResult(index-2);
             
           
        }
    }
}
